import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import HelloWorld from '../components/HelloWorld.vue';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/HomeView.vue')
  },
  {
    path: '/hello',
    name: 'Hello',
    component: HelloWorld,
    props: { msg: '欢迎学习Vue+TS!' }
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;